-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
GH-123545: Remove duplicative Py_DECREF when handling _PyOptimizer_Optimize errors
#123546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it looks like this is taken care of in error_tier_two (where GOTO_UNWIND() jumps). Just one suggestion for rewording the NEWS entry:
Misc/NEWS.d/next/Core_and_Builtins/2024-09-01-00-02-05.gh-issue-123545.8nQNbL.rst
Outdated
Show resolved
Hide resolved
|
This will probably require a manual backport, unfortunately. |
|
Also, the test failures are weird, but look unrelated. |
They are unrelated. They are caused by some weird glibc stuff so don't worry! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
The automatic backport will probably fail, but the bot should give you instructions for how to do it manually. Let me know if you need help. I think only _DYNAMIC_EXIT needs to be updated for 3.13, since _EXIT_TRACE works differently on that branch.
|
Thanks @savannahostrowski for the PR, and @brandtbucher for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Sorry, @savannahostrowski and @brandtbucher, I could not cleanly backport this to |
…ptimizer_Optimize errors (pythonGH-123546) (cherry picked from commit 1fbc118) Co-authored-by: Savannah Ostrowski <[email protected]>
|
GH-123759 is a backport of this pull request to the 3.13 branch. |
|
GH-123759 is a backport of this pull request to the 3.13 branch. |
This PR removes duplicative
Py_DECREFcalls when_PyOptimizer_Optimizereturns-1. In both cases, we do so in the conditional block and then as part of theGOTO_UNWINDmacro. This never really happens in practice, but it would be problematic if this error'd.Py_DECREFwhen handling_PyOptimizer_Optimizeerrors #123545